package com.efuture.io;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

/**
 * @ClassNAME BufferedReaderTest
 * @Description BufferedReader 字符读取缓冲流使用
 * @Author zhaoshanshan
 * @Date 2021/9/8 8:47 下午
 * @Version 1.0
 */
public class BufferedReaderTest {

    public static void main(String[] args) {
        BufferedReader br = null;
        try{
            br = new BufferedReader(new FileReader("javasestudy/src/com.efuture.io/TestFileOne.txt"));
            String s = null;
            while ((s=br.readLine())!=null){
                System.out.println(s);
            }
        }catch (Exception e){
            e.getStackTrace();
        }finally {
           if(null!=br){
               try {
                   br.close();
               } catch (IOException e) {
                   e.printStackTrace();
               }
           }

        }
    }
}